<script setup lang="ts">
import { provide, ref } from 'vue';
import { RouterView } from 'vue-router'
import router from '@/router';

const { clientWidth } = document.documentElement
const asideVisible = ref(clientWidth > 500)
provide('asideVisible', asideVisible)

router.afterEach(() => {
  if (clientWidth <= 500) {
    asideVisible.value = false
  }
})
</script>

<template>
  <RouterView />
</template>

<style scoped>

</style>
